﻿@model EvincePayroll.Data.LeaveMasterData
@{
    
}
<script type="text/javascript">
    $(document).ready(function () {
        var sickLeave = $('#sickLeave').text();
        var Casualleave = $('#Casualleave').text();
        var PrivilageLeave = $('#PrivilageLeave').text();
        var LeaveWithoutPay = $('#LeaveWithoutPay').text();
        $("#sickDropDown option:contains(" + sickLeave + ")").attr('selected', 'selected');
        $("#cLDropDown option:contains(" + Casualleave + ")").attr('selected', 'selected');
        $("#pLDropDown option:contains(" + PrivilageLeave + ")").attr('selected', 'selected');
        $("#lWPDropDown option:contains(" + LeaveWithoutPay + ")").attr('selected', 'selected');
    });

</script>
<div class="message success" style="width: 90%; margin-left: 20px;">
    <h5>
        Curent leaves</h5>
    <p>
        @if (Model != null)
        {
            <table style="width: 100%;">
                <tr>
                    <td style="width: 30%;">
                        Sick Leaves:
                    </td>
                    <td align="left" style="width: 70%;">
                        <label id="sickLeave" style="color: Orange;">
                            @Model.Sickleave</label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 30%;">
                        Privilage Leaves:
                    </td>
                    <td align="left" style="width: 70%;">
                        <label id="PrivilageLeave" style="color: Orange;">
                            @Model.PrivilageLeave</label><br />
                    </td>
                </tr>
                <tr>
                    <td style="width: 30%;">
                        Casual Leaves:
                    </td>
                    <td align="left" style="width: 70%;">
                        <label id="Casualleave" style="color: Orange;">
                            @Model.CasualLeave</label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 30%;">
                        Leave without Pay:
                    </td>
                    <td align="left" style="width: 70%;">
                        <label id="LeaveWithoutPay" style="color: Orange;">
                            @Model.LeaveWithoutPay</label>
                    </td>
                </tr>
            </table>
        }
    </p>
</div>
<ul>
    <li id="li_1">
        <label class="description" for="element_2">
            Sick Leave
        </label>
        <br />
        <div>
            @Html.DropDownListFor(m => m.Sickleave, new SelectList(ViewBag.List as System.Collections.IEnumerable, "Value", "Text"), "Select", new { style = "width:30%", @class = "requireded", id = "sickDropDown" })
        </div>
    </li>
    <li id="li_2">
        <label class="description" for="element_2">
            Privilage Leave
        </label>
        <br />
        <div>
            @Html.DropDownListFor(m => m.PrivilageLeave, new SelectList(ViewBag.List as System.Collections.IEnumerable, "Value", "Text"), "Select", new { style = "width:30%", @class = "requireded", id = "pLDropDown" })
        </div>
    </li>
    <li id="li_3">
        <label class="description" for="element_2">
            Casual Leave
        </label>
        <br />
        <div>
            @Html.DropDownListFor(m => m.CasualLeave, new SelectList(ViewBag.List as System.Collections.IEnumerable, "Value", "Text"), "Select", new { style = "width:30%", @class = "requireded", id = "cLDropDown" })
        </div>
    </li>
    <li id="li_4">
        <label class="description" for="element_2">
            Leave Without Pay
        </label>
        <br />
        <div>
            @Html.DropDownListFor(m => m.LeaveWithoutPay, new SelectList(ViewBag.List as System.Collections.IEnumerable, "Value", "Text"), "Select", new { style = "width:30%", @class = "requireded", id = "lWPDropDown" })
        </div>
    </li>
    <li id="li_5">
        <br />
        <button class="btn btn-orange" runat="server">
            Update</button>
    </li>
</ul>
@Html.HiddenFor(m => m.LeaveMasterId, new { id = "leaveMasterId" })
